﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DataboundControls.Default" %>

<%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Entity</title>
    <style type="text/css">
    body{text-align:center;margin:0;padding:0;border-top:8px solid #ccc}
    #wrapper{text-align:left;margin:0 auto;width:800px;padding-top:60px;}
    </style>
</head>
<body>
<div id="wrapper">
    <form id="form1" runat="server">
    <div>
    <asp:EntityDataSource DefaultContainerName="NORTHWNDEntities" ID="uiEntityDataSource" runat="server" ConnectionString="name=NORTHWNDEntities" EntitySetName="Employees">
    </asp:EntityDataSource>

    <asp:ListBox Rows="1" ID="uiListBox" runat="server" DataSourceID="uiEntityDataSource" DataTextField="FirstName" DataValueField="EmployeeID" OnSelectedIndexChanged="HandleUiListBoxChange" AutoPostBack="true"></asp:ListBox>
    </div>

    <asp:ObjectDataSource ID="uiObjDatasource" runat="server"></asp:ObjectDataSource>

    <asp:Chart ID="Chart1" runat="server" DataSourceID="uiEntityDataSource">
        <series>
            <asp:Series ChartType="Pie" Name="Series1">
            </asp:Series>
        </series>
        <chartareas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </chartareas>
    </asp:Chart>
    </form>
</div>
</body>
</html>
